<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[category_id]', $categoryNameList, $row['category_id'], ['class'=>'form-control selectpicker',"id" => "c-category_id", 'required'=>'required'])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[type]', ['1'=>__('Type_product'), '2'=>__('Type_material')],$row.type)}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Carbon_ycl')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-carbon_ycl" data-rule="required" class="form-control" name="row[carbon_ycl]" type="number" value="{$row.carbon_ycl}">
        </div>
    </div>
    <div class="form-group"  data-favisible="type=1">
        <label class="control-label col-xs-12 col-sm-2">{:__('Carbon_cp')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-carbon_cp" data-rule="required" class="form-control" name="row[carbon_cp]" type="number" value="{$row.carbon_cp}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_account')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[is_account]', ['0'=>__('Not_certified'), '1'=>__('Certified')],$row.is_account)}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" data-rule="required" class="form-control" min="0" name="row[price]" type="number" value="{$row.price|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-description" data-rule="" class="form-control " rows="5" name="row[description]" cols="50">{$row.description|htmlentities}</textarea>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" class="form-control" size="35" name="row[images]" type="text" value="{$row.images_str|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_authority')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[is_authority]', ['0'=>__('Not_certified'), '1'=>__('Certified')],$row.is_authority)}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Product_review')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[product_review]', ['0'=>__('Hidden'), '1'=>__('Normal')],$row.product_review)}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['0'=>__('Hidden'), '1'=>__('Normal')],$row.status)}
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
